package com.yfp.client.mapper;

import com.yfp.client.domain.LotteryRecordsClientRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author admin
* @description 针对表【lottery_records_client_records(抽奖-用户参与记录表)】的数据库操作Mapper
* @createDate 2025-01-03 09:43:51
* @Entity com.yfp.client.domain.LotteryRecordsClientRecords
*/
public interface LotteryRecordsClientRecordsMapper extends BaseMapper<LotteryRecordsClientRecords> {

    /**
     * 抽奖记录
     * @param userId
     * @param lotteryId
     * @return
     */
    List<Long> lotteryRecord(@Param("userId") String userId, @Param("lotteryId") Long lotteryId, @Param("getTime") Date getTime);

    /**
     * 根据时间段
     * @param startOfDay
     * @param endOfDay
     * @param lotteryId
     * @param clientId
     * @return
     */
    Integer timeLotteryCount(@Param("startOfDay") Date startOfDay, @Param("endOfDay") Date endOfDay, @Param("lotteryId") Long lotteryId, @Param("clientId") String clientId);

    void add(LotteryRecordsClientRecords records);
}




